package org.vectrics.user;

import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;

public class UserPrivilegeTypeSet extends HashSet {
	public static final long serialVersionUID = 3602460234683L;

	public UserPrivilegeTypeSet() {
		super();
	}

	public UserPrivilegeTypeSet(int initialCapacity) {
		super(initialCapacity);
	}

	public UserPrivilegeTypeSet(int initialCapacity, float loadFactor) {
		super(initialCapacity, loadFactor);
	}

	public UserPrivilegeTypeSet(Collection c) {
		super(c);
	}

	public boolean hasRoleType(UserPrivilegeType userPrivilegeType) {
		boolean result = false;
		Iterator iter = this.iterator();
		while (iter.hasNext()) {
			UserPrivilegeType cur = (UserPrivilegeType)iter.next();
			if (cur.getCode().equals(userPrivilegeType.getCode())) {
				result = true;
			}
		}
		return(result);
	}
	
	
	
}
